package net.sk.china.front.request;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import net.sk.china.front.constants.RegularConstants;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * 获取验证码 Request
 * +----------------------------------------------------------------------
 * // | Talk To [ 聊来改善地区金融服务环境，助力企业发展 ]
 * // +----------------------------------------------------------------------
 * // | Copyright (c) 2018-2024 聊来 All rights reserved.
 * // +----------------------------------------------------------------------
 * // | Licensed ( <a href="http://www.apache.org/licenses/LICENSE-2.0">apache</a> )
 * // +----------------------------------------------------------------------
 * // | @Author: 聊来 <18970881148@qq.com>
 * // +----------------------------------------------------------------------
 * // | DateTime: 2024/6/14 15:41
 * // +----------------------------------------------------------------------
 */

@Data
public class SendCodeRequest implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "手机号", required = true)
    @NotBlank(message = "手机号不能为空")
    @Pattern(regexp = RegularConstants.PHONE, message = "手机号码格式错误")
    private String phone;

    @ApiModelProperty(value = "验证码类型 login:登录 register:注册 retrieve:找回密码 pcRegister：PC端注册 pcRetrieve：PC端找回密码", required = true, example = "login")
    @NotBlank(message = "验证码类型不能为空")
    @Pattern(regexp = RegularConstants.SMS_CODE_TYPE, message = "验证码类型错误")
    private String type;
}
